
from django.conf.urls import url
from . import views

urlpatterns = [
    # 商品列表页 ?sort=排序方式
    url(r'^list/(?P<category_id>\d+)/(?P<page_num>\d+)/$', views.ListView.as_view(), name='list'),
    # 热销排行 /hot/(?P<category_id>\d+)/
    url(r'^hot/(?P<category_id>\d+)/$', views.HotView.as_view(), name='hot'),
    # 商品详情页面 /detail/(?P<sku_id>\d+)/
    url(r'^detail/(?P<sku_id>\d+)/$', views.DetailView.as_view(), name='detail'),
    # 统计分类商品日访问量 category_id
    url(r'^detail/visit/(?P<category_id>\d+)/$', views.CategoryGoodsCountView.as_view(), name='categorycount'),
    # 购物车 carts/
    url(r'^carts/$', views.CartsView.as_view(), name='carts'),
    # 购物车 全选 全不选
    url(r'^carts/selection/$', views.CartsSelectAllView.as_view(), name='cartsselectallview'),
    # 购物车简单展示
    url(r'^carts/simple/$', views.CartsSimpleView.as_view(), name='cartssimple'),
    # 详情页评价展示/comments/'+ this.sku_id +'/'
    url(r'comments/(?P<sku_id>\d+)/', views.CommentsView.as_view(), name='comments')
]
